#ifndef  _UTILS_H_
#define  _UTILS_H_

int Hex2Char(unsigned int fromi,unsigned char * toc);
int Char2Hex(unsigned char fromc,unsigned int * toi);

int Bitstr2ByteArr(unsigned char * bs, unsigned char * ba, int *lba);
int ByteArr2Bitstr(unsigned char * ba, unsigned char * bs, int *lbs);

int Int2ByteArr(unsigned int i, unsigned char * ba);
int ByteArr2Int(unsigned char * ba,unsigned int * i);

int SmallPrimeList(int n, int *plist, int *len);
int ExtendedGCD(int a, int b, int *k, int *u, int *v);
#endif
